<!--#include file="lib/utf-8.asp"-->
<!--#include file="lib/connopen.asp"-->
<!--#include file="lib/asp-common-lib.asp"-->
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>报关单登记系统</title>
<!--#include file="lib/plugins.asp"-->
<style type="text/css">
	.ui-datepicker table {
		border: 0;
	}
</style>
<script type="text/javascript">
	$(function() {
	});
</script>
<!--#include file="lib/js-google-analytics.asp"-->
</head>

<body>
<!--#include file="lib/header.asp"-->
<!--#include file="lib/nav.asp"-->
<div id="main">
<!--#include file="lib/col1.asp"-->
<!--#include file="lib/col2.asp"-->
	<div id="col3" role="main">
		<div id="col3_content" class="clearfix">
		<%

'How many session variables are there?
Response.Write "There are " & Session.Contents.Count &" Session variables<br />"

'Use a For Each ... Next to loop through the entire collection
For Each strName in Session.Contents
	'Is this session variable an array?
	If IsArray(Session(strName)) then
	'If it is an array, loop through each element one at a time
		if ArrayRange(Session(strName))=2 then
			for cols=0 to ubound(session(strname),2)	'数组的第二维数,表示列数
				For rows = 0 to UBound(Session(strName))	'数组的第一维数，表示行数
					Response.Write strName & "("&rows &", "& cols& ") - " & Session(strName)(rows,cols) & " "
				Next
				response.write( "<br />")
			next
		else
			for i=0 to ubound(Session(strName))
				Response.Write strName & "(" & i & ") - " & Session(strName)(i) & "<br /> "
			next
		end if
	Else
	'We aren't dealing with an array, so just display the variable
		Response.Write strName & " - " & Session.Contents(strName) & "<br />"
	End If
Next
Public Function ArrayRange(MyArray) 
  '返回值：0-该变量不是数组,1-该变量为1维数组，2-该变量为2维数组,.....60-该变量为60维数组
   on   error   resume   next
   If Not IsArray(MyArray) Then '首先判断传入的变量是否为数组
      ArrayRange = 0
      Exit Function
   End If
   For i = 1 To 60 '在VB中数组最大维数是60
		If err Then Exit For
    Temp = UBound(MyArray, i) '用UBound函数判断某一维的上界，如果大于数组的实际维数时将产生产生超出范围错误
    RangeNum = i
   Next
   ArrayRange = RangeNum-1
   Exit Function
End Function
		%>
		</div>
	</div>
</div>
<!--#include file="lib/footer.asp"-->
</body>
</html>
<!--#include file="lib/connclose.asp"-->

